<template>
  <div class="app-popup-swiper"  @click="handleSwiperClose">
    <mt-swipe v-if="picList.length>0" :auto="0" class="swiper-pic" :defaultIndex="picIndex">
      <mt-swipe-item v-for="(item,index) in picList">
        <div class="item-content">
          <img class="img" :src="item.src"/>
        </div>
        <span class="item-title">{{index+1}}/{{picList.length}}　{{item.fileLocate}}</span>
      </mt-swipe-item>
    </mt-swipe>
  </div>
</template>

<script>

export default {
  props:{
    picList:[]
  },
  data(){
    return{
      picIndex:0,
    }
  },
  methods:{
    handleSwiperClose(){
      this.$emit('popupSwiperClose');
    }
  }
}
</script>
<style>
  .app-popup-swiper{
    height: 100%;
  }
  .app-popup-swiper .me-popup-pic{
    width: 100%;
    height:100%;
  }
  .app-popup-swiper .icon-close-pic{
    background: #c34853;
    position: absolute;
    top:0;
    right:0;
    z-index:2000;
    width: 48px;
    height: 48px;
    font-size: 24px;
    color:#fff;
    text-align: center;
    line-height: 48px;
  }

  .app-popup-swiper .mint-swipe{
    background: #000;
    text-align: center;
  }
  .app-popup-swiper .swiper-pic .item-content{
    position: absolute;
    left: 0;
    right: 0;
    top:0;
    bottom: 0;
  }
  .app-popup-swiper .me-popup-pic .mint-swipe,.app-popup-swiper .me-popup-pic .mint-swipe-items-wrap{
    height: 100% !important;
  }

  .app-popup-swiper .swiper-pic .mint-swipe-indicators{
    display: none;
  }

  .app-popup-swiper .mint-swipe img{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    display: block;
    max-width: 100%;
    max-height:100%;
  }
  .app-popup-swiper .swiper-pic .item-title{
    background:rgba(0,0,0,0.5);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding:12px 0;
    font-size: 16px;
    color: #fff;
  }
</style>
